#include <stdio.h>
#include <stdlib.h>

int max_stage;

int main(void)
{
    int *x;
    int n;

    int aa =100;

    scanf("%d", &n);

    //x = calloc(n, sizeof(int));
    x = malloc(n * sizeof(int));

    if (x==NULL) {
        puts("allocate memory error!");
    } else {
//        for (int i=0; i<n; i++) {
//            x[i] = i+1;
//        }
//

        for (int i=0; i<n; ++i) {
            printf("x[%d] = %d\n", i, x[i]);
        }

        putchar('\n');


        free(x);

        for (int i=0; i<n; ++i) {
            printf("x[%d] = %d\n", i, x[i]);
        }

    }

    return 0;
}
